package com.jenings.shop.service;

import com.jenings.shop.entity.Manager;
import com.jenings.shop.mapper.ManagerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManagerService {
    @Autowired
    ManagerMapper managerMapper;
    //管理员接口
    //查询全部管理员
    public List<Manager> selectAll(){
        List<Manager> managerList = managerMapper.selectAll();
        return  managerList;
    }
    //查询部分管理员
    public List<Manager> seleceSome(String glyname){
        List<Manager> managerList = managerMapper.selectSome(glyname);
        return managerList;
    }
    //查询管理员个人信息
    public Manager selectByte(String glyname){
        Manager manager = managerMapper.selectByte(glyname);
        return manager;
    }
    //修改个人信息
    public boolean updateByte(Manager manager){
        return managerMapper.updateByte(manager);
    }
    //删除管理员
    public boolean delByte(Integer glyid){
        return managerMapper.delByte(glyid);
    }
    //增加管理员
    public boolean addByte(Manager manager){
        return managerMapper.addByte(manager);
    }
}
